-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Enable poweroff feature on NXP MCXA and MCXN series MCUs. #92844
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable poweroff feature on NXP MCXA and MCXN series MCUs. #92844
Conversation
f05d9c5
to
52be524
Compare
52be524
to
a99e520
Compare
samples/boards/nxp/mcx/mcxa/poweroff/src/main.c contains the common Zephyr API code. Can we avoid creating the NXP board-specific samples in the |
Pulling MCUX SDK cmc, vbat, wuu driver to Zephyr build tree. Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
This commit enables MCXN236, MCXN947 LPUART pin internal pullup resistor. For MCXN947 and MCXN236, during LPUAR initialization, the RX pin is pulled down internally and STAT [RAF] is set to one. In this state, attempting to enter low power mode will trigger LPACK reset and therefore cannot truly enter low power mode. The correct setting should be to enable LPUART pin internal pullup resistor. Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
This commit introduced the following changes: 1. Selected kconfig option 'HAS_POWEROFF' for NXP MCXA series. 2. Added power.c for NXP MCXA series, in this file, we currently implemented 'z_sys_poweroff()' function. 3. For the MCXA series, after waking up from the deep power down mode, the reset handler will be executed, and we need to release the I/O pads and certain peripheral devices to normal operating mode in 'soc_reset_hook'. Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
This commit introduced the following changes: 1. Selected kconfig option 'HAS_POWEROFF' for NXP MCXN series. 2. Added power.c for NXP MCXN series, in this file, we currently implemented 'z_sys_poweroff()' function. 3. For the MCXN series, after waking up from the deep power down mode, the reset handler will be executed, and we need to release the I/O pads and certain peripheral devices to normal operating mode in 'soc_reset_hook'. Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Enabled FRO16k for LPTMR when LPTMR clock source is set to 0x1. Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
Enabled FRO16k for LPTMR when LPTMR clock source is set to 0x1. Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
This commit enabled poweroff case for NXP MCXA and MCXN series MCUs. Signed-off-by: Zhaoxiang Jin <Zhaoxiang.Jin_1@nxp.com>
@butok it does make sense. The yaml could be conditioned on the HAS_POWEROFF. @hakehuang, can you provide guidance? |
a99e520
to
fce2e01
Compare
How about create a NXP MCUs general poweroff demo under samples/boards/nxp/poweroff? |
|
agree with @butok, @ZhaoxiangJin I would suggest to follow the samples\boards\nxp\mimxrt595_evk\system_off and create a for poweroff. |
It's possible to create a common demo. Platform-specific peculiarities should be addressed through board-specific configurations/overlays. In my opinion, vendor-specific samples break the main Zephyr philosophy, and they should be an exception (probably, approved by TSC). |
@butok , you can take a look at the tests/subsys/pm which is much more well organized, and I am working on a power shield to fully support this. As to NPI enablement, maybe it is ok to add a board vendor demo first for now, we need catchup step by step. |
I am creating a general poweroff example for NXP MCUs, i will also migrate already exist mimxrt595_evk and mimxrt1060_evk system_off example to the new poweroff example. |
This PR enabled poweroff feature for NXP MCXA and MCXN series MCUs.